app.service('brandService', function ($http) {

    this.findPage = function (pageNum, pageSize, searchEntity) {
        return $http.post("../brand/findPage?pageNum=" + pageNum + "&pageSize=" + pageSize, searchEntity)
    };

    this.findAll = function () {
        return $http.get("../brand/findAll");
    };

    this.findOne = function (brandId) {
        return $http.get("../brand/findOne?brandId=" + brandId);
    };

    this.insert = function (brand) {
        return $http.post("../brand/insert", brand);
    };

    this.update = function (brand) {
        return $http.post("../brand/update", brand);
    };

    this.secretKeyDownload = function (brandId) {
        let data = {"brandId": brandId};
        return $http.post("../brand/secretKeyDownload", data)
    }
});